package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HmzWarehouseMapper;
import com.ruoyi.system.domain.HmzWarehouse;
import com.ruoyi.system.service.IHmzWarehouseService;

/**
 * 用于存储仓库信息的Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-10
 */
@Service
public class HmzWarehouseServiceImpl implements IHmzWarehouseService 
{
    @Autowired
    private HmzWarehouseMapper hmzWarehouseMapper;

    /**
     * 查询用于存储仓库信息的
     * 
     * @param id 用于存储仓库信息的主键
     * @return 用于存储仓库信息的
     */
    @Override
    public HmzWarehouse selectHmzWarehouseById(Long id)
    {
        return hmzWarehouseMapper.selectHmzWarehouseById(id);
    }

    /**
     * 查询用于存储仓库信息的列表
     * 
     * @param hmzWarehouse 用于存储仓库信息的
     * @return 用于存储仓库信息的
     */
    @Override
    public List<HmzWarehouse> selectHmzWarehouseList(HmzWarehouse hmzWarehouse)
    {
        return hmzWarehouseMapper.selectHmzWarehouseList(hmzWarehouse);
    }

    /**
     * 新增用于存储仓库信息的
     * 
     * @param hmzWarehouse 用于存储仓库信息的
     * @return 结果
     */
    @Override
    public int insertHmzWarehouse(HmzWarehouse hmzWarehouse)
    {
        hmzWarehouse.setCreateTime(DateUtils.getNowDate());
        return hmzWarehouseMapper.insertHmzWarehouse(hmzWarehouse);
    }

    /**
     * 修改用于存储仓库信息的
     * 
     * @param hmzWarehouse 用于存储仓库信息的
     * @return 结果
     */
    @Override
    public int updateHmzWarehouse(HmzWarehouse hmzWarehouse)
    {
        hmzWarehouse.setUpdateTime(DateUtils.getNowDate());
        return hmzWarehouseMapper.updateHmzWarehouse(hmzWarehouse);
    }

    /**
     * 批量删除用于存储仓库信息的
     * 
     * @param ids 需要删除的用于存储仓库信息的主键
     * @return 结果
     */
    @Override
    public int deleteHmzWarehouseByIds(Long[] ids)
    {
        return hmzWarehouseMapper.deleteHmzWarehouseByIds(ids);
    }

    /**
     * 删除用于存储仓库信息的信息
     * 
     * @param id 用于存储仓库信息的主键
     * @return 结果
     */
    @Override
    public int deleteHmzWarehouseById(Long id)
    {
        return hmzWarehouseMapper.deleteHmzWarehouseById(id);
    }
}
